package com.wxb.qd.common;

/**
 * 自定义错误码
 *
 * @author wangxb
 */
public enum ErrorCode {


    SUCCESS(0,"成功"),
    PARAMS_ERROR(400,"参数错误"),
    NOT_LOGIN_ERROR(401,"用户未登录"),
    NOT_FOUND_ERROR(404,"请求数据不存在"),
    FORBIDDEN_ERROR(403,"禁止访问"),
    SYSTEM_ERROR(500,"系统内部异常");

    /**
     * 错误码
     */
    private final int code;

    /**
     * 错误信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
